import {createRouter, createWebHistory} from "vue-router";
import Layout from "@/components/x-layout/index.vue";
import Dashboard from "../views/Dashboard.vue";


declare module "vue-router" {
    interface RouteMeta {
        level?: number;
        hidden: boolean;
        icon?: string;
        index?: number;
        code?: string;
    }
}

const router = createRouter({
    history: createWebHistory(import.meta.env.BASE_URL),
    routes: [
        {
            path: "/",
            name: "Layout",
            component: Layout,
            meta: {level: 0, hidden: true},
            children: [
                {
                    path: "/",
                    name: "home",
                    component: Dashboard,
                    meta: {level: 1, hidden: false, icon: "home", index: 0, code: ""}
                }
            ]
        }
    ]
});

export default router;
